package org.example.curriculum_design_6_16.entity.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName scholarship_rule
 */
@TableName(value ="scholarship_rule")
@Data
public class ScholarshipRule implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 
     */
    private String scholarshipType;

    /**
     * 适用年级
     */
    private Integer grade;

    /**
     * 
     */
    private Double maxCourseScore;

    /**
     * 
     */
    private Double maxPoliticalScore;

    /**
     * 
     */
    private Double maxResearchScore;

    /**
     * 
     */
    private Double maxServiceScore;

    /**
     * 
     */
    private Date effectiveDate;

    /**
     * 
     */
    private Integer isCurrent;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ScholarshipRule other = (ScholarshipRule) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getScholarshipType() == null ? other.getScholarshipType() == null : this.getScholarshipType().equals(other.getScholarshipType()))
            && (this.getGrade() == null ? other.getGrade() == null : this.getGrade().equals(other.getGrade()))
            && (this.getMaxCourseScore() == null ? other.getMaxCourseScore() == null : this.getMaxCourseScore().equals(other.getMaxCourseScore()))
            && (this.getMaxPoliticalScore() == null ? other.getMaxPoliticalScore() == null : this.getMaxPoliticalScore().equals(other.getMaxPoliticalScore()))
            && (this.getMaxResearchScore() == null ? other.getMaxResearchScore() == null : this.getMaxResearchScore().equals(other.getMaxResearchScore()))
            && (this.getMaxServiceScore() == null ? other.getMaxServiceScore() == null : this.getMaxServiceScore().equals(other.getMaxServiceScore()))
            && (this.getEffectiveDate() == null ? other.getEffectiveDate() == null : this.getEffectiveDate().equals(other.getEffectiveDate()))
            && (this.getIsCurrent() == null ? other.getIsCurrent() == null : this.getIsCurrent().equals(other.getIsCurrent()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getScholarshipType() == null) ? 0 : getScholarshipType().hashCode());
        result = prime * result + ((getGrade() == null) ? 0 : getGrade().hashCode());
        result = prime * result + ((getMaxCourseScore() == null) ? 0 : getMaxCourseScore().hashCode());
        result = prime * result + ((getMaxPoliticalScore() == null) ? 0 : getMaxPoliticalScore().hashCode());
        result = prime * result + ((getMaxResearchScore() == null) ? 0 : getMaxResearchScore().hashCode());
        result = prime * result + ((getMaxServiceScore() == null) ? 0 : getMaxServiceScore().hashCode());
        result = prime * result + ((getEffectiveDate() == null) ? 0 : getEffectiveDate().hashCode());
        result = prime * result + ((getIsCurrent() == null) ? 0 : getIsCurrent().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", scholarshipType=").append(scholarshipType);
        sb.append(", grade=").append(grade);
        sb.append(", maxCourseScore=").append(maxCourseScore);
        sb.append(", maxPoliticalScore=").append(maxPoliticalScore);
        sb.append(", maxResearchScore=").append(maxResearchScore);
        sb.append(", maxServiceScore=").append(maxServiceScore);
        sb.append(", effectiveDate=").append(effectiveDate);
        sb.append(", isCurrent=").append(isCurrent);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}